//
//  TKAlertCenter.m
//  TKAlertCenter
//
//  Created by apple on 17/10/6.
//  Copyright (c) 2016年 apple. All rights reserved.
//

#import "TKAlertCenter.h"

#define SCREEN_WIDTH   [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT  [UIScreen mainScreen].bounds.size.height

@interface TKAlertCenter ()

@property (nonatomic,strong)UIImageView  *bgimage;

@property (nonatomic,strong)UILabel      *messagelabel;

@end


@implementation TKAlertCenter

+(TKAlertCenter *)defaultCenter
{
    TKAlertCenter *view=[[TKAlertCenter alloc]initWithFrame:CGRectZero];
    view.tag=2000016;
    //    view.backgroundColor=[UIColor orangeColor];
    return view;
}

-(void)postAlertWithMessage:(NSString *)message withDelegate:(id)delegate
{
    UIAlertView *alertview=[[UIAlertView alloc]initWithTitle:nil message:message delegate:delegate cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
    [alertview show];
    return;
}

-(void)postAlertWithMessage:(NSString *)message
{

   
    
    UIAlertView *alertview=[[UIAlertView alloc]initWithTitle:nil message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
    [alertview show];
    return;
}

- (void) postAlertWithMessage:(NSString*)message image:(UIImage*)image
{
    
}

-(void)Hidden
{
    [UIView beginAnimations:nil context:nil];
    
    [UIView setAnimationDelay:1.5];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(animationStep3)];
    self.alpha = 0;
    [UIView commitAnimations];
}

- (void) animationStep3{
    [self removeFromSuperview];
}

@end
